<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 自动识别最新稳定版的Vue.js  -->
    <script src="vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>
<body xmlns:v-on="http://www.w3.org/1999/xhtml">
    <div id="app">

        <template>
            <el-alert
                    title="不可关闭的 alert"
                    type="success"
                    :closable="false">
            </el-alert>
            <el-alert
                    title="自定义 close-text"
                    type="info"
                    close-text="知道了">
            </el-alert>
            <el-alert
                    title="设置了回调的 alert"
                    type="warning"
                    @close="hello">
            </el-alert>
        </template>

        <script>
            export default {
                methods: {
                    hello() {
                        alert('Hello World!');
                    }
                }
            }
        </script>
    </div>
</body>
<script>
    /*必须有vue*/
    new Vue({
        el:'#app'
    })
</script>
</html>